﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace GUI
{
    public partial class frmThemMonAn : Form
    {
        public frmThemMonAn()
        {
            InitializeComponent();
        }

        private void btThem_Click(object sender, EventArgs e)
        {

        }

        private void btCapNhat_Click(object sender, EventArgs e)
        {
            btVao.Visible = false;
            btDong.Visible = true;
            btLuu.Visible = true;
            btXoa.Visible = true;
            btCapNhat.Enabled = false;
            btThem.Enabled = false;
        }

        private void btLuu_Click(object sender, EventArgs e)
        {

        }

        private void btXoa_Click(object sender, EventArgs e)
        {

        }

        private void btDong_Click(object sender, EventArgs e)
        {
            btCapNhat.Enabled = true;
            btThem.Enabled = true;

            btVao.Visible = true;
            btDong.Visible = false;
            btLuu.Visible = false;
            btXoa.Visible = false;
        }

        private void btVao_Click(object sender, EventArgs e)
        {
            int i = dgvDanhSach.Rows.Count;
            dgvDanhSach.Rows.Add(i, txtTenNVL.Text, txtSoluong.Text);
        }
    }
}
